// 服务层 server 集中所有的接口
import { post, get } from "./ajax";

export const http = {

    // 注册
    register: body => post('/vue/signup', body),

    // 登录
    login: body => post('/vue/login', body),

    // 验证码
    sendcaptcha: params => get('/vue/sendcaptcha', params),

    // 主页数据
    getmain: params => get('vue/getmain', params),

    // 获取个人信息
    getuserinfo: params => get('/vue/getuserinfo', params),

    // 添加购物车
    postmessage: body => post('/vue/postmessage', body),

    // 查询
    postcar: body => post('/vue/postcar', body),

    // 删除
    delgoods: body => post('/vue/delgoods', body),

    // 地址提交
    postaddress: body => post('/vue/postaddress', body),

    // 地址查询
    postedit: body => post('/vue/postedit', body),
}
